﻿

using System.Collections;
using System.Runtime.InteropServices.Marshalling;


class PaperScrapper
{
    static void Main(string[] args)
    {
        String? userCase;
        int resultCount = 10;
        String strErrorUserCase = "Wrong option, try again";
        String uiMessage = @"
        1 - Search by text
        2 - Latest page
        3 - Hot page
        4 - Toplist page
        5 - Random page
        6 - Change result output.
        0 - Exit";

        do
        {
            Console.WriteLine("Which option PaperScrapper should use:" + uiMessage);
            userCase = Console.ReadLine();

            switch (userCase)
            {
                case "1":
                    SearchByText();
                    break;
                case "2": break;
                case "3": break;
                case "4": break;
                case "5": break;
                case "6":
                    Console.WriteLine("Current result output is "+ resultCount);
                    Console.WriteLine("Input how many pictures do you want to download per request: ");
                    
                    int tmpResCount = resultCount;
                    
                    if (!int.TryParse(Console.ReadLine(), out resultCount))
                    {
                        resultCount = tmpResCount;
                        Console.WriteLine("You must enter a number. Try again!");
                    }
                    break;
                case "7": break;
                default: break;
            }
        } while (userCase != "0");
    }


    private static void SearchByText()
    {
        Console.WriteLine("Input text: ");
        String? inputText = Console.ReadLine();

    }

    private static void ShowLatestPage()
    {

    }

    private static void ShowHotPage()
    {

    }

    private static void ShowRandomPage()
    {

    }

}

